package com.yykj.drup.server.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Getter
@Setter
@TableName("order_info")
@ApiModel(value = "Order对象", description = "")
public class OrderInfo {

    @ApiModelProperty("订单主键ID")
    @TableId("id")
    private Integer id;


    @ApiModelProperty("药店订单编号")
    private String orderStoreNum;

    @ApiModelProperty("总订单编号")
    private String orderSysNum;

    @NotNull(message = "药店ID不能空")
    @ApiModelProperty("药店Id")
    private Integer storeId;

    @ApiModelProperty("药店名称")
    private String storeName;

    @ApiModelProperty("药店图片")
    private String storeHeadImgurl;

    @ApiModelProperty("药店订单总金额")
    private BigDecimal storeProductPrice;

    @ApiModelProperty("药店订单药品总数")
    private Integer storeProductCount;

    @ApiModelProperty("第三方订单编号")
    private String orgOrderNum;

    @ApiModelProperty("第三方机构标识 1：微分销")
    private Integer orgTag;

    @ApiModelProperty("订单配送方式")
    private Integer freightType;

    @ApiModelProperty("订单运费")
    private BigDecimal freightPrice;

    @ApiModelProperty("配送到达时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime freightArriveTime;

    /*@Deprecated
    @ApiModelProperty("订单支付状态 1：待支付  2：待收货  3：已完成  4:已取消")
    @TableField("order_status")
    private Integer orderStatus;*/

    /*@Deprecated
    @ApiModelProperty("订单下单时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;*/

/*    @Deprecated
    @ApiModelProperty("订单支付时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime payTime;*/

    @ApiModelProperty("收货人地址")
    private String orderUserAddress;

    @ApiModelProperty("收货人姓名")
    private String orderUserName;

    @ApiModelProperty("收货人电话")
    private String orderUserPhone;

    @ApiModelProperty("省")
    private String province;

    @ApiModelProperty("市")
    private String city;

    @ApiModelProperty("区")
    private String area;


    @ApiModelProperty("系统删除标识 0/1 删除/未删除")
    private Integer isDeleted;

    @ApiModelProperty("查询的快递公司的名称")
    private String orderCom;

    @ApiModelProperty("查询的快递单号")
    private String orderComNumber;

    @ApiModelProperty("快递单当前状态，0未签收，1已签收")
    private String orderComCheck;

    @ApiModelProperty("快递单签收时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime orderComCheckTime;

    @ApiModelProperty("用户确认收货状态，0未签收，1已签收")
    private Integer orderStoreCheck;

    @ApiModelProperty("用户确认收货时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime orderStoreCheckTime;

    @TableField(exist = false)
    private List<OrderDetails> orderDetails;

}
